home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_069 / frags / poster < prev   
Text File  |  1992-05-06  |  2KB  |  40 lines

  1. Article 3542 of comp.sys.amiga:
  2. Path: mcdsun!noao!hao!hplabs!sri-unix!rutgers!ames!ucbcad!ucbvax!jade!violet.berkeley.edu!mwm
  3. From: mwm@violet.berkeley.edu (Mike (My watch has windows) Meyer)
  4. Newsgroups: comp.sys.amiga
  5. Subject: replacement for frags
  6. Message-ID: <3148@jade.BERKELEY.EDU>
  7. Date: 13 Apr 87 10:39:30 GMT
  8. Sender: usenet@jade.BERKELEY.EDU
  9. Reply-To: mwm@violet.berkeley.edu(Mike (My watch has windows) Meyer)
  10. Organization: Missionaria Phonibalonica
  11. Lines: 342
  12.  
  13.  
  14. Somewhere along the way, I picked up a program called frags. It
  15. reports the number of free blocks of size 2^(n-1) to (2^n)-1 for n up
  16. to 19 or so (blocks of max size 512K-1). Since it's easy to have
  17. blocks bigger than 512K, I rewrote it to handle n up to 24 (blocks of
  18. 16Meg). Those of you with 68020's can rewrite it to handle n up to 32
  19. if you wish. Since the result is also 300 bytes smaller than the
  20. original, I'm happily replacing the old one everywhere.
  21.  
  22. I tweaked it a little on the way through, so blocks smaller than any
  23. possible (8 is the smallest possible), including zero-sized blocks,
  24. are handled (just to prevent them from raping things should they occur
  25. because of bugs elsewhere. I also deleted the header so that the
  26. output can be fed to filters. Oughta delete the `:' also, but...
  27.  
  28. This also represents my first attempt at Knuth's "literate
  29. programming." Need to go read the references to get it right, but the
  30. results speak for themselves (at length).
  31.  
  32.     <mike
  33.  
  34. --
  35. Here's a song about absolutely nothing.            Mike Meyer        
  36. It's not about me, not about anyone else,        ucbvax!mwm        
  37. Not about love, not about being young.            mwm@berkeley.edu  
  38. Not about anything else, either.            mwm@ucbjade.BITNET
  39.  
  40.